Field of the Invention
The present invention relates to an image processing device and an image capturing apparatus for obtaining a depth information image, which represents a distribution of depth information about an object, from a plurality of captured images. The present invention also relates to an image processing method for obtaining a depth information image, which represents a distribution of depth information about an object, from a plurality of captured images.
Description of the Related Art
Japanese Patent Laid-Open No. 01-167610 describes a “depth from defocus” (DFD) method for obtaining the distance to an object in the depth direction by using a two-dimensional image of the object captured by an image capturing apparatus. In the DFD method, a plurality of images that have different degrees of blurring are obtained by controlling the shooting conditions (also referred to as the shooting parameters) of an image capturing optical system. Then, the correlation between the sizes or the degrees of blur of a plurality of images is calculated by using a distance-measuring pixel and the surrounding pixels. The correlation between the sizes or the degrees of blur changes in accordance with the distance from the focus position of the image capturing optical system to an object. Therefore, the distance from the focus position of the image capturing optical system to the object can be obtained by using the correlation.
Japanese Patent Laid-Open No. 2010-016743 describes a distance-measuring apparatus for calculating the object distance by using a blur correlation, which is calculated for each of regions to be processed by using a DFD method. The distance-measuring apparatus sets a weight coefficient for the blur correlation for each of pixels in a region to be processed and calculates a weighted average of the blur correlation by using the weight coefficients.
In general, an image capturing optical system of an image capturing apparatus has an axial chromatic aberration, and therefore the focus positions differ between colors (wavelengths). As a result, in the case where depth information is calculated by using a correlation between the sizes or the degrees of blur, the calculated depth information has an error due to a color (wavelength). In other words, when depth information is calculated by using a DFD method or the like using a color image, a distance-measurement error due to a color (wavelength) occurs.
Japanese Patent Laid-Open No. 01-167610 and Japanese Patent Laid-Open No. 2010-016743 do not describe the occurrence of an error in depth information due to a color (wavelength).
The present invention provides a technology for obtaining depth information about an object with high precision by using a DFD method using a color image.